import { buildService } from '../../helper/service'

// 值类型为String或Object,String为url(method),Object同axios(config)参数支持相同,data和params只能为对象类型
const settings = {
  // 获取地址列表
  getAddressList: {
    url: '/api/v1/resource/take_addr',
    method: 'get'
  },
  // 新增收货地址
  createAddress: {
    url: '/api/v1/resource/take_addr',
    method: 'post'
  },
  updateAddress: {
    url: '/api/v1/resource/take_addr',
    method: 'put'
  },
  // 创建订单
  createOrder: {
    url: '/api/v1/resource/order',
    method: 'post'
  },
  // 调起支付
  pay: {
    url: '/web/v1/pay/ali_pay/pay',
    method: 'post'
  }

}

export default buildService(settings)
